package ooday03;

public class SwimTest {
    public static void main(String[] args) {
        //dog object have four menthods
        Dog dog=new Dog("雷欧",6,"白");
        dog.drink();        //复用Anmial类中的方法
        dog.eat();          //Dog类重写Animal类中的抽象方法
        dog.lookHome();     //Dog类中特有的方法
        dog.swim();         //Dog类中重写Swim接口中的抽象方法

        //fish object have 3 menthods
        Fish fish=new Fish("泡泡",3,"粉");
        fish.drink();
        fish.eat();
        fish.swim();
        //chick object have four menthods
        Chick chick=new Chick("小花花",1,"黄");
        chick.drink();
        chick.eat();
        chick.layEggs();
    }
}
